    $(document).ready(function(){

	    var counterQuestions = 2;
	    var counterAnswers = 1;
		
	    $("#addQuestion").click(function () {
			
			counterAnswers = 1;
			var newTextBoxDiv = $(document.createElement('ul')).attr("id", 'QuestionDiv' + counterQuestions);
                newTextBoxDiv.html('<label>Question #'+ counterQuestions + ' : </label>' +
				'<input type="text" name="textbox' + counterQuestions + 
				'" id="textbox' + counterQuestions + '" value="" >');
            
			newTextBoxDiv.appendTo("#QuestionGroup");
				
		    counterQuestions++;
	    });

	    $("#removeQuestion").click(function () {
		    if(counterQuestions==1){
		        alert("No more Questions to remove");
		        return false;
		    }   
	        counterQuestions--;
			
	        $("#QuestionDiv" + counterQuestions).remove();
		});

		$("#addAnswer").click(function () {
			
			var newAnswerBoxDiv = $(document.createElement('li')).attr("id", 'AnswerDiv' + counterAnswers);
                newAnswerBoxDiv.html('<label>Answer #'+ counterAnswers + ' : </label>' +
				'<input type="text" name="answerNamebox' + counterAnswers + 
				'" id="answerBox' + counterAnswers + '" value="" >' + 
				'<input type="radio" name="radioButton' + counterAnswers + '" value = True""/>'
				+ 'True? <br />');
            
			newAnswerBoxDiv.appendTo("#QuestionGroup");
				
		    counterAnswers++;
	    });

	      $("#removeAnswer").click(function () {
		    if(counterAnswers==1){
		        alert("No more Answers to remove");
		        return false;
		    }   
	        counterAnswers--;
			
	        $("#AnswerDiv" + counterAnswers).remove();
		});
		
		$("#getQuestionValue").click(function () {
		
			var msg = '';
			for(i=1; i<counterQuestions; i++){
				msg += "\n Textbox #" + i + " : " + $('#textbox' + i).val();
			}
		   	alert(msg);
		});

		$("#getAnswerValue").click(function () {
		
			var msg2 = '';
			for(j=1; j<counterAnswers; j++){
				msg2 += "\n Textbox #" + j + " : " + $('#textbox' + j).val();
			}
		   	alert(msg2);
		});
		
  });
